﻿@{
    ViewBag.Title = "EnterFocusText";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Enter Focus Text</h2>

<div id="testDiv">
    <p class="p1">
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
    </p>

    <p class="p2">
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
    </p>

    <p class="p3">
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
        <input class="testClass" value="" name="test1" /><br>
    </p>
</div>

<script type="text/javascript" src="/JsLib/zeus/plugin/zeus.plugin.focus.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var inputs = $(".p1 :input"); // 获取表单中的所有输入框
        inputs = $.merge(inputs, $(".p3 :input"));
        inputs = $.merge(inputs, $(".p2 :input"));

        ZEUS.FOCUS.enterFocus("#testDiv :input", inputs);
    })
</script>

